package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DetailTranslationMapper;
import com.ruoyi.system.domain.DetailTranslation;
import com.ruoyi.system.service.IDetailTranslationService;

/**
 * Service业务层处理
 *
 * @author ruoyi
 * @date 2024-04-29
 */
@Service
public class DetailTranslationServiceImpl implements IDetailTranslationService
{
    @Autowired
    private DetailTranslationMapper detailTranslationMapper;

    /**
     * 查询
     *
     * @param translationId 主键
     * @return
     */
    @Override
    public DetailTranslation selectDetailTranslationByTranslationId(Integer translationId)
    {
        return detailTranslationMapper.selectDetailTranslationByTranslationId(translationId);
    }

    /**
     * 查询列表
     *
     * @param detailTranslation
     * @return 【
     */
    @Override
    public List<DetailTranslation> selectDetailTranslationList(DetailTranslation detailTranslation)
    {
        return detailTranslationMapper.selectDetailTranslationList(detailTranslation);
    }

    /**
     * 新增
     *
     * @param detailTranslation
     * @return 结果
     */
    @Override
    public int insertDetailTranslation(DetailTranslation detailTranslation)
    {
        detailTranslation.setCreateTime(DateUtils.getNowDate());
        return detailTranslationMapper.insertDetailTranslation(detailTranslation);
    }

    /**
     * 修改
     *
     * @param detailTranslation
     * @return 结果
     */
    @Override
    public int updateDetailTranslation(DetailTranslation detailTranslation)
    {
        detailTranslation.setUpdateTime(DateUtils.getNowDate());
        return detailTranslationMapper.updateDetailTranslation(detailTranslation);
    }

    /**
     * 批量删除
     *
     * @param translationIds 需要删除的主键
     * @return 结果
     */
    @Override
    public int deleteDetailTranslationByTranslationIds(Integer[] translationIds)
    {
        return detailTranslationMapper.deleteDetailTranslationByTranslationIds(translationIds);
    }

    /**
     * 删除信息
     *
     * @param translationId 主键
     * @return 结果
     */
    @Override
    public int deleteDetailTranslationByTranslationId(Integer translationId)
    {
        return detailTranslationMapper.deleteDetailTranslationByTranslationId(translationId);
    }
}
